<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>兄弟啊,还好吗?</title>
    <script src="./res/jquery-3.5.1.min.js"></script>
    <style>
        .box {
            display: block;
            border: 2px solid #abcdef;
            color: #331258;
            padding: 5px;
            margin: 15px;
        }
    </style>
</head>

<body>
    <p>p01</p>
    <span>sapn01</span>
    <h3>h3</h3>
    <span>sapn02</span>
    <p>p02</p>
</body>

</html>
<script>
    $(function(e) {
        $('h3').click(function(e) {
            e.preventDefault();
            let tds = $('h3').siblings('p');
            window.console.log(tds);
        });
    });
</script>